<!DOCTYPE html>
<html>
<head>
    

    

    
<!-- Baidu Tongji -->
<script>var _hmt = _hmt || []</script>
<script async src="//hm.baidu.com/hm.js?088c9394d6f332ce6581e9a3d824c884"></script>
<!-- End Baidu Tongji -->




    <meta charset="utf-8">
    
    
    
    <title>VPS添加SWAP交换内存 | Joyace&#39;s Blog</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    
    <meta name="theme-color" content="#3F51B5">
    
    
    <meta name="keywords" content="">
    <meta name="description" content="准备工作 注意：只有虚拟化构架为XEN、KVM、VM-Ware的VPS可以自己添加SWAP，OpenVZ不支持添加SWAP！root 账号  添加SWAP操作，必须是 root 用户才可以操作，所以请用 root 账号登陆服务器或者切换为 root 用户：1su 输入执行后，会提示你输入 root 账号的密码，输入正确密码并回车后，没有报错那么就可以继续下面的步骤了。 检查硬盘大小因为SWAP是在">
<meta name="keywords">
<meta property="og:type" content="article">
<meta property="og:title" content="VPS添加SWAP交换内存">
<meta property="og:url" content="http://Joyace.top/2017/04/27/VPS添加SWAP交换内存/index.html">
<meta property="og:site_name" content="Joyace's Blog">
<meta property="og:description" content="准备工作 注意：只有虚拟化构架为XEN、KVM、VM-Ware的VPS可以自己添加SWAP，OpenVZ不支持添加SWAP！root 账号  添加SWAP操作，必须是 root 用户才可以操作，所以请用 root 账号登陆服务器或者切换为 root 用户：1su 输入执行后，会提示你输入 root 账号的密码，输入正确密码并回车后，没有报错那么就可以继续下面的步骤了。 检查硬盘大小因为SWAP是在">
<meta property="og:updated_time" content="2017-04-27T05:37:47.078Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="VPS添加SWAP交换内存">
<meta name="twitter:description" content="准备工作 注意：只有虚拟化构架为XEN、KVM、VM-Ware的VPS可以自己添加SWAP，OpenVZ不支持添加SWAP！root 账号  添加SWAP操作，必须是 root 用户才可以操作，所以请用 root 账号登陆服务器或者切换为 root 用户：1su 输入执行后，会提示你输入 root 账号的密码，输入正确密码并回车后，没有报错那么就可以继续下面的步骤了。 检查硬盘大小因为SWAP是在">
    
        <link rel="alternate" type="application/atom+xml" title="Joyace&#39;s Blog" href="/atom.xml">
    
    <link rel="shortcut icon" href="/favicon.ico">
    <link rel="stylesheet" href="//unpkg.com/hexo-theme-material-indigo@latest/css/style.css">
    <script>window.lazyScripts=[]</script>
</head>

<body>
    <div id="loading" class="active"></div>

    <aside id="menu" class="hide" >
  <div class="inner flex-row-vertical">
    <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menu-off">
        <i class="icon icon-lg icon-close"></i>
    </a>
    <div class="brand-wrap" style="background-image:url(/img/brand.jpg)">
      <div class="brand">
        <a href="/" class="avatar waves-effect waves-circle waves-light">
          <img src="/img/avatar.jpg">
        </a>
        <hgroup class="introduce">
          <h5 class="nickname">Joyace</h5>
          <a href="mailto:605036335@qq.com" title="605036335@qq.com" class="mail">605036335@qq.com</a>
        </hgroup>
      </div>
    </div>
    <div class="scroll-wrap flex-col">
      <ul class="nav">
        
            <li class="waves-block waves-effect">
              <a href="/"  >
                <i class="icon icon-lg icon-home"></i>
                主页
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/archives"  >
                <i class="icon icon-lg icon-archives"></i>
                Archives
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://github.com/Joyace" target="_blank" >
                <i class="icon icon-lg icon-github"></i>
                Github
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="http://weibo.com/u/3216366760" target="_blank" >
                <i class="icon icon-lg icon-weibo"></i>
                Weibo
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="http://ss.joyace.top" target="_blank" >
                <i class="icon icon-lg icon-plane"></i>
                Plane
              </a>
            </li>
        
      </ul>
    </div>
  </div>
</aside>

    <main id="main">
        <header class="top-header" id="header">
    <div class="flex-row">
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light on" id="menu-toggle">
          <i class="icon icon-lg icon-navicon"></i>
        </a>
        <div class="flex-col header-title ellipsis">VPS添加SWAP交换内存</div>
        
        <div class="search-wrap" id="search-wrap">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="back">
                <i class="icon icon-lg icon-chevron-left"></i>
            </a>
            <input type="text" id="key" class="search-input" autocomplete="off" placeholder="输入感兴趣的关键字">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="search">
                <i class="icon icon-lg icon-search"></i>
            </a>
        </div>
        
        
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menuShare">
            <i class="icon icon-lg icon-share-alt"></i>
        </a>
        
    </div>
</header>
<header class="content-header post-header">

    <div class="container fade-scale">
        <h1 class="title">VPS添加SWAP交换内存</h1>
        <h5 class="subtitle">
            
                <time datetime="2017-04-27T13:05:45.000Z" itemprop="datePublished" class="page-time">
  2017-04-27
</time>


            
        </h5>
    </div>

    


</header>


<div class="container body-wrap">
    
    <aside class="post-widget">
        <nav class="post-toc-wrap" id="post-toc">
            <h4>TOC</h4>
            <ol class="post-toc"><li class="post-toc-item post-toc-level-1"><a class="post-toc-link" href="#准备工作"><span class="post-toc-number">1.</span> <span class="post-toc-text">准备工作</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#root-账号"><span class="post-toc-number">1.1.</span> <span class="post-toc-text">root 账号</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#检查硬盘大小"><span class="post-toc-number">1.2.</span> <span class="post-toc-text">检查硬盘大小</span></a></li></ol></li><li class="post-toc-item post-toc-level-1"><a class="post-toc-link" href="#添加交换区SWAP"><span class="post-toc-number">2.</span> <span class="post-toc-text">添加交换区SWAP</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#查看-当前SWAP大小"><span class="post-toc-number">2.1.</span> <span class="post-toc-text">查看 当前SWAP大小</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#创建-SWAP文件"><span class="post-toc-number">2.2.</span> <span class="post-toc-text">创建 SWAP文件</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#建立-SWAP文件"><span class="post-toc-number">2.3.</span> <span class="post-toc-text">建立 SWAP文件</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#启用-SWAP文件"><span class="post-toc-number">2.4.</span> <span class="post-toc-text">启用 SWAP文件</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#取消-SWAP文件"><span class="post-toc-number">2.5.</span> <span class="post-toc-text">取消 SWAP文件</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#取消-开机启动加载"><span class="post-toc-number">2.6.</span> <span class="post-toc-text">取消 开机启动加载</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#删除-SWAP文件"><span class="post-toc-number">2.7.</span> <span class="post-toc-text">删除 SWAP文件</span></a></li></ol></li></ol>
        </nav>
    </aside>
    
<article id="post-VPS添加SWAP交换内存"
  class="post-article article-type-post fade" itemprop="blogPost">

    <div class="post-card">
        <h1 class="post-card-title">VPS添加SWAP交换内存</h1>
        <div class="post-meta">
            <time class="post-time" title="2017-04-27 21:05:45" datetime="2017-04-27T13:05:45.000Z"  itemprop="datePublished">2017-04-27</time>

            


            
<span id="busuanzi_container_page_pv" title="文章总阅读量" style='display:none'>
    <i class="icon icon-eye icon-pr"></i><span id="busuanzi_value_page_pv"></span>
</span>


            

        </div>
        <div class="post-content" id="post-content" itemprop="postContent">
            <h1 id="准备工作"><a href="#准备工作" class="headerlink" title="准备工作"></a>准备工作</h1><ul>
<li>注意：只有虚拟化构架为XEN、KVM、VM-Ware的VPS可以自己添加SWAP，OpenVZ不支持添加SWAP！<h2 id="root-账号"><a href="#root-账号" class="headerlink" title="root 账号"></a>root 账号</h2></li>
</ul>
<p>添加SWAP操作，必须是 root 用户才可以操作，所以请用 root 账号登陆服务器或者切换为 root 用户：<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">su</div></pre></td></tr></table></figure></p>
<p>输入执行后，会提示你输入 root 账号的密码，输入正确密码并回车后，没有报错那么就可以继续下面的步骤了。</p>
<h2 id="检查硬盘大小"><a href="#检查硬盘大小" class="headerlink" title="检查硬盘大小"></a>检查硬盘大小</h2><p>因为SWAP是在硬盘中建立一个交换区文件，所以需要磁盘中最少有 这个文件大小 的空闲空间。<br>输入执行这个命令，即可看到你的VPS当前磁盘大小和使用情况：<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">df -m</div></pre></td></tr></table></figure></p>
<p>从下面的示例中可以看到，这个VPS大概有 15GB的硬盘大小(14621 MB)，用了 1GB(1117 MB)，剩下12.5GB(12763 MB)大小。<br>既然硬盘大小充足，那就可以继续下面步骤了。<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div></pre></td><td class="code"><pre><div class="line"><span class="comment"># VPS示例提示 #</span></div><div class="line"><span class="comment"># 下列参数表头分别为：文件系统、总大小(单位MB)、已用大小(单位MB)、未用大小(单位MB)、使用率(%)、挂载点</span></div><div class="line">root@doub.io:~<span class="comment"># df -m</span></div><div class="line">Filesystem                                             1M-blocks  Used Available Use% Mounted on</div><div class="line">rootfs                                                     14621  1117     12763   9% /</div><div class="line">udev                                                          10     0        10   0% /dev</div><div class="line">tmpfs                                                         50     1        50   1% /run</div><div class="line">/dev/disk/by-uuid/12dc23                                   14621  1117     12763   9% /</div><div class="line">tmpfs                                                          5     0         5   0% /run/lock</div><div class="line">tmpfs                                                        202     0       202   0% /run/shm</div><div class="line"><span class="comment"># VPS示例提示 #</span></div></pre></td></tr></table></figure></p>
<h1 id="添加交换区SWAP"><a href="#添加交换区SWAP" class="headerlink" title="添加交换区SWAP"></a>添加交换区SWAP</h1><h2 id="查看-当前SWAP大小"><a href="#查看-当前SWAP大小" class="headerlink" title="查看 当前SWAP大小"></a>查看 当前SWAP大小</h2><p>我们可以先查看一下当前的SWAP大小（单位 MB）。<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">free -m</div></pre></td></tr></table></figure></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div></pre></td><td class="code"><pre><div class="line"><span class="comment"># VPS示例提示 #</span></div><div class="line">root@doub.io:~<span class="comment"># free -m</span></div><div class="line">             total       used       free     shared    buffers     cached</div><div class="line">Mem:           244        141        103          0         38         76</div><div class="line">-/+ buffers/cache:         26        218</div><div class="line">Swap:          127          0        127</div><div class="line"><span class="comment"># VPS示例提示 #</span></div></pre></td></tr></table></figure>
<h2 id="创建-SWAP文件"><a href="#创建-SWAP文件" class="headerlink" title="创建 SWAP文件"></a>创建 SWAP文件</h2><p>从上面的VPS示例中可以看到，这个VPS物理内存约等于 256MB，所以可以添加 物理内存*2的SWAP=512MB 。</p>
<p>bs 是字节数，这里是1024 B，count 是blocks块数，of 是要输出的SWAP交换区文件（本文章仅为示例，文件和位置可以自己改）</p>
<p>所以：<strong>bs=1024 B=1 KB，512000 * 1 KB=512000 KB / 1024 ≈ 512 MB</strong>（为了直观的看，就按1000来算了 :lol: ）<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">dd <span class="keyword">if</span>=/dev/zero of=/var/swapfile1 bs=1024 count=512000</div></pre></td></tr></table></figure></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div></pre></td><td class="code"><pre><div class="line"><span class="comment"># VPS示例提示 #</span></div><div class="line">root@doub.io:~<span class="comment"># dd if=/dev/zero of=/var/swapfile1 bs=1024 count=512000</span></div><div class="line">512000+0 records <span class="keyword">in</span></div><div class="line">512000+0 records out</div><div class="line">524288000 bytes (524 MB) copied, 4.09314 s, 128 MB/s</div><div class="line"><span class="comment"># VPS示例提示 #</span></div></pre></td></tr></table></figure>
<p>查看文件是否创建成功，大小是否正确(因为按1000计算，所以会不足 512MB)<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">du -ah /var|grep <span class="string">"swapfile1"</span></div></pre></td></tr></table></figure></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line"><span class="comment"># VPS示例提示 #</span></div><div class="line">root@doub.io:~<span class="comment"># du -ah /var|grep "swapfile1"</span></div><div class="line">501M	/var/swapfile1</div></pre></td></tr></table></figure>
<h2 id="建立-SWAP文件"><a href="#建立-SWAP文件" class="headerlink" title="建立 SWAP文件"></a>建立 SWAP文件</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">mkswap /var/swapfile1</div></pre></td></tr></table></figure>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div></pre></td><td class="code"><pre><div class="line"><span class="comment"># VPS示例提示 #</span></div><div class="line">root@doub.io:~<span class="comment"># mkswap /var/swapfile1</span></div><div class="line">Setting up swapspace version 1, size = 511996 KiB</div><div class="line">no label, UUID=c48fef60-7d49-450c-bfd1-7a7826de7cdd</div><div class="line"><span class="comment"># VPS示例提示 #</span></div></pre></td></tr></table></figure>
<h2 id="启用-SWAP文件"><a href="#启用-SWAP文件" class="headerlink" title="启用 SWAP文件"></a>启用 SWAP文件</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">swapon /var/swapfile1</div></pre></td></tr></table></figure>
<p>启用 SWAP文件没有任何提示，启用后我们查看一下是否正常启用：<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">swapon <span class="_">-s</span></div><div class="line">free -m</div></pre></td></tr></table></figure></p>
<p>可以看到下面的SWAP中，成功添加启用了一个 SWAP交换区。<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div></pre></td><td class="code"><pre><div class="line"><span class="comment"># VPS示例提示 #</span></div><div class="line">root@doub.io:~<span class="comment"># swapon -s</span></div><div class="line">Filename				Type		Size	Used	Priority</div><div class="line">/dev/vda2                               partition	131068	0	-1</div><div class="line">/var/swapfile1                         file		511996	0	-2</div><div class="line"></div><div class="line">root@doub.io:~<span class="comment"># free -m</span></div><div class="line">             total       used       free     shared    buffers     cached</div><div class="line">Mem:           244        240          4          0         34        175</div><div class="line">-/+ buffers/cache:         30        214</div><div class="line">Swap:          627          0        627</div><div class="line"><span class="comment"># VPS示例提示 #</span></div><div class="line">``` bash</div><div class="line"><span class="comment">## 开机启动加载</span></div><div class="line">``` bash</div><div class="line"><span class="built_in">echo</span> <span class="string">"/var/swapfile1 swap swap defaults 0 0"</span> &gt;&gt; /etc/fstab</div></pre></td></tr></table></figure></p>
<p>如果你又不想要刚才新添加的SWAP了，那么可以取消它们。</p>
<h2 id="取消-SWAP文件"><a href="#取消-SWAP文件" class="headerlink" title="取消 SWAP文件"></a>取消 SWAP文件</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">swapoff /var/swapfile1</div></pre></td></tr></table></figure>
<h2 id="取消-开机启动加载"><a href="#取消-开机启动加载" class="headerlink" title="取消 开机启动加载"></a>取消 开机启动加载</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">sed -i <span class="string">"/swapfile1/d"</span> /etc/fstab</div></pre></td></tr></table></figure>
<p>取消后，可以再 free -m 查看一下SWAP，确定取消了，那么就可以删除 SWAP文件了。</p>
<h2 id="删除-SWAP文件"><a href="#删除-SWAP文件" class="headerlink" title="删除 SWAP文件"></a>删除 SWAP文件</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">rm -rf /var/swapfile1</div></pre></td></tr></table></figure>
<p>参考：<a href="https://doub.io/linux-jc7/" target="_blank" rel="external">https://doub.io/linux-jc7/</a></p>

        </div>

        <blockquote class="post-copyright">
    <div class="content">
        
<span class="post-time">
    最后更新时间：<time datetime="2017-04-27T05:37:47.078Z" itemprop="dateUpdated">2017-04-27 13:37:47</time>
</span><br>


        
        这里可以写作者留言，标签和 hexo 中所有变量及辅助函数等均可调用，示例：<a href="/2017/04/27/VPS添加SWAP交换内存/" target="_blank" rel="external">http://Joyace.top/2017/04/27/VPS添加SWAP交换内存/</a>
        
    </div>
    <footer>
        <a href="http://Joyace.top">
            <img src="/img/avatar.jpg" alt="Joyace">
            Joyace
        </a>
    </footer>
</blockquote>

        
<div class="page-reward">
    <a id="rewardBtn" href="javascript:;" class="page-reward-btn waves-effect waves-circle waves-light">赏</a>
</div>



        <div class="post-footer">
            

            
<div class="page-share-wrap">
    

<div class="page-share" id="pageShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=http://Joyace.top/2017/04/27/VPS添加SWAP交换内存/&title=《VPS添加SWAP交换内存》 — Joyace's Blog&pic=http://Joyace.top/img/avatar.jpg" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=http://Joyace.top/2017/04/27/VPS添加SWAP交换内存/&title=《VPS添加SWAP交换内存》 — Joyace's Blog&source=" data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http://Joyace.top/2017/04/27/VPS添加SWAP交换内存/" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《VPS添加SWAP交换内存》 — Joyace's Blog&url=http://Joyace.top/2017/04/27/VPS添加SWAP交换内存/&via=http://Joyace.top" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=http://Joyace.top/2017/04/27/VPS添加SWAP交换内存/" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>



    <a href="javascript:;" id="shareFab" class="page-share-fab waves-effect waves-circle">
        <i class="icon icon-share-alt icon-lg"></i>
    </a>
</div>



        </div>
    </div>

    
<nav class="post-nav flex-row flex-justify-between">
  
    <div class="waves-block waves-effect prev">
      <a href="/2017/04/27/安利一个翻墙去广告DNS/" id="post-prev" class="post-nav-link">
        <div class="tips"><i class="icon icon-angle-left icon-lg icon-pr"></i> Prev</div>
        <h4 class="title">安利一个翻墙去广告DNS</h4>
      </a>
    </div>
  

  
    <div class="waves-block waves-effect next">
      <a href="/2017/04/27/linux bash shell之变量替换句法/" id="post-next" class="post-nav-link">
        <div class="tips">Next <i class="icon icon-angle-right icon-lg icon-pl"></i></div>
        <h4 class="title">linux bash shell之变量替换句法</h4>
      </a>
    </div>
  
</nav>



    










</article>

<div id="reward" class="page-modal reward-lay">
    <a class="close" href="javascript:;"><i class="icon icon-close"></i></a>
    <h3 class="reward-title">
        <i class="icon icon-quote-left"></i>
        喵呜~
        <i class="icon icon-quote-right"></i>
    </h3>
    <ul class="reward-items">
        
        <li>
            <img src="/img/wechat.jpg" title="微信打赏二维码" alt="微信打赏二维码">
            <p>微信</p>
        </li>
        

        
        <li>
            <img src="/img/alipay.jpg" title="支付宝打赏二维码" alt="支付宝打赏二维码">
            <p>支付宝</p>
        </li>
        
    </ul>
</div>



</div>

        <footer class="footer">
    <div class="top">
        
<p>
    <span id="busuanzi_container_site_uv" style='display:none'>
        站点总访客数：<span id="busuanzi_value_site_uv"></span>
    </span>
    <span id="busuanzi_container_site_pv" style='display:none'>
        站点总访问量：<span id="busuanzi_value_site_pv"></span>
    </span>
</p>


        <p>
            
                <span><a href="/atom.xml" target="_blank" class="rss" title="rss"><i class="icon icon-lg icon-rss"></i></a></span>
            
            <span>博客内容遵循<a rel="license" href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh">知识共享 署名 - 非商业性 - 相同方式共享 4.0 国际协议</a></span>
        </p>
    </div>
    <div class="bottom">
        <p>
            <span>Power by <a href="http://hexo.io/" target="_blank">Hexo</a> Theme <a href="https://github.com/yscoder/hexo-theme-indigo" target="_blank">indigo</a></span>
            <span>Joyace &copy; 2017</span>
        </p>
    </div>
</footer>

    </main>
    <div class="mask" id="mask"></div>
<a href="javascript:;" id="gotop" class="waves-effect waves-circle waves-light"><span class="icon icon-lg icon-chevron-up"></span></a>



<div class="global-share" id="globalShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=http://Joyace.top/2017/04/27/VPS添加SWAP交换内存/&title=《VPS添加SWAP交换内存》 — Joyace's Blog&pic=http://Joyace.top/img/avatar.jpg" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=http://Joyace.top/2017/04/27/VPS添加SWAP交换内存/&title=《VPS添加SWAP交换内存》 — Joyace's Blog&source=" data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http://Joyace.top/2017/04/27/VPS添加SWAP交换内存/" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《VPS添加SWAP交换内存》 — Joyace's Blog&url=http://Joyace.top/2017/04/27/VPS添加SWAP交换内存/&via=http://Joyace.top" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=http://Joyace.top/2017/04/27/VPS添加SWAP交换内存/" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>


<div class="page-modal wx-share" id="wxShare">
    <a class="close" href="javascript:;"><i class="icon icon-close"></i></a>
    <p>扫一扫，分享到微信</p>
    <img src="//api.qrserver.com/v1/create-qr-code/?data=http://Joyace.top/2017/04/27/VPS添加SWAP交换内存/" alt="微信分享二维码">
</div>




    <script src="//cdn.bootcss.com/node-waves/0.7.4/waves.min.js"></script>
<script>
var BLOG = { ROOT: '/', SHARE: true, REWARD: true };



</script>

<script src="//unpkg.com/hexo-theme-material-indigo@latest/js/main.min.js"></script>


<div class="search-panel" id="search-panel">
    <ul class="search-result" id="search-result"></ul>
</div>
<template id="search-tpl">
<li class="item">
    <a href="{path}" class="waves-block waves-effect">
        <div class="title ellipsis" title="{title}">{title}</div>
        <div class="flex-row flex-middle">
            <div class="tags ellipsis">
                {tags}
            </div>
            <time class="flex-col time">{date}</time>
        </div>
    </a>
</li>
</template>

<script src="//unpkg.com/hexo-theme-material-indigo@latest/js/search.min.js" async></script>






<script async src="//dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>





</body>
</html>
